//package com.empire.module.system.framework.captcha.config;
//
//import com.empire.module.system.framework.captcha.core.RedisCaptchaServiceImpl;
//import com.xingyuv.captcha.properties.AjCaptchaProperties;
//import com.xingyuv.captcha.service.CaptchaCacheService;
//import com.xingyuv.captcha.service.impl.CaptchaServiceFactory;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.core.StringRedisTemplate;
//
///**
// * 验证码的配置类
// *
// * @author 未来源码
// */
//@Configuration(proxyBeanMethods = false)
//public class empireProCaptchaConfiguration {
//
//    @Bean
//    public CaptchaCacheService captchaCacheService(AjCaptchaProperties config,
//                                                   StringRedisTemplate stringRedisTemplate) {
//        CaptchaCacheService captchaCacheService = CaptchaServiceFactory.getCache(config.getCacheType().name());
//        if (captchaCacheService instanceof RedisCaptchaServiceImpl) {
//            ((RedisCaptchaServiceImpl) captchaCacheService).setStringRedisTemplate(stringRedisTemplate);
//        }
//        return captchaCacheService;
//    }
//
//}
